package com.shopping.system.mapper;

import com.shopping.common.entity.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    /**
     * 查找用户
     * @param username
     * @return
     */
    @Select("SELECT * FROM tb_user WHERE username = #{username} ")
    UserVo findUserByUsername(@Param("username") String username);

    /**
     * 添加用户
     * @param userVo
     * @return
     */
    Integer adduser(UserVo userVo);

    /**
     * 电话 账号 查重
     * @param userVo
     * @return
     */
    UserVo findSameUserNameOrPhone(UserVo userVo);
}
